package com.model;

public class DifficultyInfo {
    private Programming programming;
    private int submittedNum;
    private int correctNum;
    private float correctRate;

    public DifficultyInfo() {
    }

    public DifficultyInfo(Programming programming, int submittedNum, int correctNum) {
        this.setProgramming(programming);
        this.setSubmittedNum(submittedNum);
        this.setCorrectNum(correctNum);
        this.correctRate = (float) (correctNum * 1.0 / submittedNum);
    }

    public Programming getProgramming() {
        return programming;
    }

    public void setProgramming(Programming programming) {
        this.programming = programming;
    }

    public int getSubmittedNum() {
        return submittedNum;
    }

    public void setSubmittedNum(int submittedNum) {
        this.submittedNum = submittedNum;
    }

    public int getCorrectNum() {
        return correctNum;
    }

    public void setCorrectNum(int correctNum) {
        this.correctNum = correctNum;
    }

    public float getCorrectRate() {
        return correctRate;
    }

    public void setCorrectRate(float correctRate) {
        this.correctRate = correctRate;
    }

}
